
package combat.example.protocol.interfaces;

import java.io.Serializable;
import java.util.ArrayList;

import combat.example.protocol.data.DoublePoint;
import combat.example.protocol.data.PhysicalObject;
import combat.example.protocol.types.OnboardSystemStatus;
import combat.example.protocol.types.OnboardSystemType;
import combat.example.protocol.types.SensorSystemType;


/**
 * @author Laurens Andriessen
 * @version 1.0
 */
public interface OnboardSystemInt extends Serializable {

	int systemID = -1;
	public int getSystemID();
	public void setSystemID(int systemID);

	OnboardSystemType onboardSystemType = OnboardSystemType.UNKNOWN;
	public OnboardSystemType getOnboardSystemType();
	public void setOnboardSystemType(OnboardSystemType onboardSystemType);

	OnboardSystemStatus status = OnboardSystemStatus.UNKNOWN;
	public OnboardSystemStatus getOnboardSystemStatus();
	public void setOnboardSystemStatus(OnboardSystemStatus status);

	// Sub-interface WeaponSystemInt
	interface WeaponSystemInt extends OnboardSystemInt {

		int ammo = 0;
		public int getAmmo();
		public void setAmmo(int ammo);

		DoublePoint target = null;
		public DoublePoint getTarget();
		public void setTarget(DoublePoint target);

		// ------------------------------------------

		public void fire(DoublePoint target);
	}

	// Sub-interface SensorSystemInt
	interface SensorSystemInt extends OnboardSystemInt {

		int range = 0;
		public int getRange();
		public void setRange(int range);

		SensorSystemType sensorSystemType = SensorSystemType.UNKNOWN;
		public SensorSystemType getSensorSystemType();
		public void setSensorSystemType(SensorSystemType sensorSystemType);

		// ------------------------------------------

		public ArrayList<PhysicalObject> scan();
	}
}
